Integrand size = 33, antiderivative size = 103 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {1}{2} \left (2 A b^2+a^2 (A+2 C)\right ) x+\frac {2 a b C \text {arctanh}(\sin (c+d x))}{d}+\frac {a A b \sin (c+d x)}{d}+\frac {A \cos (c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}-\frac {b^2 (A-2 C) \tan (c+d x)}{2 d} \]
[Out]
Time = 0.32 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {4180, 4161, 4132, 8, 4130, 3855} \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {1}{2} x \left (a^2 (A+2 C)+2 A b^2\right )+\frac {a A b \sin (c+d x)}{d}+\frac {A \sin (c+d x) \cos (c+d x) (a+b \sec (c+d x))^2}{2 d}+\frac {2 a b C \text {arctanh}(\sin (c+d x))}{d}-\frac {b^2 (A-2 C) \tan (c+d x)}{2 d} \]
[In]
[Out]
Rule 8
Rule 3855
Rule 4130
Rule 4132
Rule 4161
Rule 4180
Rubi steps \begin{align*} \text {integral}& = \frac {A \cos (c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}+\frac {1}{2} \int \cos (c+d x) (a+b \sec (c+d x)) \left (2 A b+a (A+2 C) \sec (c+d x)-b (A-2 C) \sec ^2(c+d x)\right ) \, dx \\ & = \frac {A \cos (c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}-\frac {b^2 (A-2 C) \tan (c+d x)}{2 d}+\frac {1}{2} \int \cos (c+d x) \left (2 a A b+\left (2 A b^2+a^2 (A+2 C)\right ) \sec (c+d x)+4 a b C \sec ^2(c+d x)\right ) \, dx \\ & = \frac {A \cos (c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}-\frac {b^2 (A-2 C) \tan (c+d x)}{2 d}+\frac {1}{2} \int \cos (c+d x) \left (2 a A b+4 a b C \sec ^2(c+d x)\right ) \, dx+\frac {1}{2} \left (2 A b^2+a^2 (A+2 C)\right ) \int 1 \, dx \\ & = \frac {1}{2} \left (2 A b^2+a^2 (A+2 C)\right ) x+\frac {a A b \sin (c+d x)}{d}+\frac {A \cos (c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}-\frac {b^2 (A-2 C) \tan (c+d x)}{2 d}+(2 a b C) \int \sec (c+d x) \, dx \\ & = \frac {1}{2} \left (2 A b^2+a^2 (A+2 C)\right ) x+\frac {2 a b C \text {arctanh}(\sin (c+d x))}{d}+\frac {a A b \sin (c+d x)}{d}+\frac {A \cos (c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{2 d}-\frac {b^2 (A-2 C) \tan (c+d x)}{2 d} \\ \end{align*}
Time = 2.21 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.26 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \left (2 A b^2+a^2 (A+2 C)\right ) (c+d x)-8 a b C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+8 a b C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+8 a A b \sin (c+d x)+\left (a^2 A+4 b^2 C+a^2 A \cos (2 (c+d x))\right ) \tan (c+d x)}{4 d} \]
[In]
[Out]
Time = 0.50 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.91
method | result | size |
derivativedivides | \(\frac {a^{2} A \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{2} \left (d x +c \right )+2 a A b \sin \left (d x +c \right )+2 C a b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+A \,b^{2} \left (d x +c \right )+C \tan \left (d x +c \right ) b^{2}}{d}\) | \(94\) |
default | \(\frac {a^{2} A \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{2} \left (d x +c \right )+2 a A b \sin \left (d x +c \right )+2 C a b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+A \,b^{2} \left (d x +c \right )+C \tan \left (d x +c \right ) b^{2}}{d}\) | \(94\) |
parallelrisch | \(\frac {-16 C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a b \cos \left (d x +c \right )+16 C \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a b \cos \left (d x +c \right )+8 a A b \sin \left (2 d x +2 c \right )+a^{2} A \sin \left (3 d x +3 c \right )+4 x d \left (2 A \,b^{2}+a^{2} \left (A +2 C \right )\right ) \cos \left (d x +c \right )+\sin \left (d x +c \right ) \left (a^{2} A +8 C \,b^{2}\right )}{8 d \cos \left (d x +c \right )}\) | \(134\) |
risch | \(\frac {a^{2} A x}{2}+x A \,b^{2}+a^{2} x C -\frac {i a^{2} A \,{\mathrm e}^{2 i \left (d x +c \right )}}{8 d}-\frac {i a A b \,{\mathrm e}^{i \left (d x +c \right )}}{d}+\frac {i a A b \,{\mathrm e}^{-i \left (d x +c \right )}}{d}+\frac {i a^{2} A \,{\mathrm e}^{-2 i \left (d x +c \right )}}{8 d}+\frac {2 i C \,b^{2}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {2 a b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{d}-\frac {2 a b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{d}\) | \(160\) |
norman | \(\frac {\left (-\frac {1}{2} a^{2} A -A \,b^{2}-C \,a^{2}\right ) x +\left (-\frac {1}{2} a^{2} A -A \,b^{2}-C \,a^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (\frac {1}{2} a^{2} A +A \,b^{2}+C \,a^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (\frac {1}{2} a^{2} A +A \,b^{2}+C \,a^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+\left (-a^{2} A -2 A \,b^{2}-2 C \,a^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\left (a^{2} A +2 A \,b^{2}+2 C \,a^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-\frac {2 \left (3 a^{2} A -2 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {\left (a^{2} A -4 a A b +2 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}-\frac {\left (a^{2} A +4 a A b +2 C \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {4 a A \left (a -2 b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}+\frac {4 a A \left (a +2 b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{3}}-\frac {2 C a b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}+\frac {2 C a b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(389\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.16 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {2 \, C a b \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - 2 \, C a b \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left ({\left (A + 2 \, C\right )} a^{2} + 2 \, A b^{2}\right )} d x \cos \left (d x + c\right ) + {\left (A a^{2} \cos \left (d x + c\right )^{2} + 4 \, A a b \cos \left (d x + c\right ) + 2 \, C b^{2}\right )} \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \]
[In]
[Out]
\[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\int \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{2} \cos ^{2}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.22 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.96 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{2} + 4 \, {\left (d x + c\right )} C a^{2} + 4 \, {\left (d x + c\right )} A b^{2} + 4 \, C a b {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 8 \, A a b \sin \left (d x + c\right ) + 4 \, C b^{2} \tan \left (d x + c\right )}{4 \, d} \]
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 175, normalized size of antiderivative = 1.70 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {4 \, C a b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 4 \, C a b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {4 \, C b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1} + {\left (A a^{2} + 2 \, C a^{2} + 2 \, A b^{2}\right )} {\left (d x + c\right )} - \frac {2 \, {\left (A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, A a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 4 \, A a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
[In]
[Out]
Time = 15.84 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.87 \[ \int \cos ^2(c+d x) (a+b \sec (c+d x))^2 \left (A+C \sec ^2(c+d x)\right ) \, dx=\frac {C\,b^2\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )}+\frac {2\,A\,a\,b\,\sin \left (c+d\,x\right )}{d}+\frac {A\,a^2\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{2\,d}-\frac {A\,a^2\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,1{}\mathrm {i}}{d}-\frac {A\,b^2\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,2{}\mathrm {i}}{d}-\frac {C\,a^2\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,2{}\mathrm {i}}{d}-\frac {C\,a\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,4{}\mathrm {i}}{d} \]
[In]
[Out]